package yxy.cherry.game.message;

import com.google.protobuf.ByteString;

import yxy.cherry.game.Reactor;
import yxy.cherry.game.base.message.MessageStation.Consumer;
import yxy.cherry.game.base.message.annotation.MessageSource;

/** 消息消费者 */
public class ConsumerImpl extends Consumer {

	public ConsumerImpl() {
		Reactor.instance.station().super();
	}

	@Override
	public void consume(int sequence, String tag, long source, long destination, int proto, ByteString data) {
		MessageSource messageSource = new MessageSource(tag, source, destination);
		MessageDispatcher.getInstance().handleMessage(sequence, messageSource, proto, data);
	}

}
